/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cw.biz;

import cw.entity.GameResult;
import cw.server.ServerConfig;
import cw.server.ServerInterface;
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author VinhTC
 */
public class GameResultBiz {

    /**
     * method use to get hight scores
     * @param sizeId
     * @return- list object GameResult
     */
    public List<GameResult> getHightScores(int sizeId) throws RemoteException {

        List<GameResult> lstGameResult = new ArrayList<GameResult>();
        try {
            ServerConfig sc = new ServerConfig();
            ServerInterface stub = sc.Setup();
            lstGameResult = stub.getHightScores(sizeId);
            return lstGameResult;

        } catch (Exception e) {
            return null;
        }
    }
}
